import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/index' },
  {
    path: '/index', component: resolve => (require(["@/views/Index"], resolve)), children: [
      {
        path: '', redirect: '/blog'
      },
      {
        path: '/blog', component: resolve => (require(["@/views/blog/Index"], resolve)),
      },
      {
        path: '/mine', component: resolve => (require(["@/views/Mine/index"], resolve)),
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
